//
//  EventTrackingService.swift
//  EventTracking
//
//  Created by 孙长坦 on 2022/11/29.
//

import Foundation
import RxSwift
import Moya
import LibNetwork

class EventTrackingService {
    static let shared = EventTrackingService()
    
    let moyaProvider: MoyaProvider<EventTrackingAPI>
    
    
    private init() {
        moyaProvider = HttpService.shared.moyaProvider()
    }
    
    func log(data: [[String: Any]]) -> Single<APIResult<Bool>> {
        return moyaProvider.rx.requestEx(.log(data: data)).map(type: Bool.self)
    }
}
